<?php
class LuminousGrammarJava extends LuminousGrammar
{
  public $keywords = array("abstract", "continue", "for", "new", "switch",
    "assert", "default", "goto", "package", "synchronized",
    "do", "if", "private", "this",
    "break", "implements", "protected", "throw",
    "else", "import", "public", "throws",
    "case", "enum", "instanceof", "return", "transient",
    "catch", "extends", "try",
    "final", "interface", "static", "void",
    "class", "finally", "strictfp", "volatile",
    "float", "native", "super", "while");

  public $types = array("byte", "const", "char", "double", "float", "int",
  "short", "long", "bool(ean)?", "String", "Boolean", "Byte", "Character", "Class",
  "Double", "Float", "Integer", "Long", "Number", "Object", "Package", 
  "Short", "StringBuffer", "Thread", "Void", "Exception",
  "Abstract(?:Collection|List|Map|SequentialList|Set)",
  "Array(?:List|s)",
  "BitSet",
  'Big(?:Integer|Decimal)',
  "Calendar",
  "Collections",
  "Currency",
  "Date",
  "Dictionary",
  "EventListenerProxy",
  "EventObject",
  "GregorianCalendar",
  "Hash(?:Map|Set|table)",
  "IdentityHashMap",
  "Linked(?:Hash(?:Map|Set)|List)",
  "ListResourceBundle",
  "Locale",
  "Observable",
  "Properties",
  "Property(?:Permission|ResourceBundle)",
  "Random",
  "ResourceBundle",
  "SimpleTimeZone",
  "Stack",
  "StringTokenizer",
  "Timer(?:Task)?",
  "TimeZone",
  "Tree(?:Map|Set)",
  "Vector",
  "WeakHashMap"
  
  );
  public $oo_separators = array('\.');
  function __construct()
  {
    
    $this->SetInfoAuthor( 
    array('name'=>'Mark Watkinson', 'email'=>'markwatkinson@gmail.com',
    'website'=>'http://www.asgaard.co.uk'));
    $this->SetInfoLanguage('java');
    $this->SetInfoVersion('0.4.0');        
    
    $this->delimited_types = array(
      
      luminous_generic_doc_comment('/**', '*/'),
      
      luminous_generic_comment('/*', '*/'),
      luminous_generic_comment('//', "\n"),
      
      luminous_generic_string('"', '"'),
      
      new LuminousDelimiterRule(0, 'CHARACTER', 0, '\'', '\'',
      'luminous_type_callback_cstring')      
      
      );
    
    $this->simple_types[] = new LuminousSimpleRule(3, 'TYPE', LUMINOUS_COMPLETE
      |LUMINOUS_REGEX, '/(?:(?<=import)|(?<=package))(\s+)([\w\.\*]+)/', null, null, 2);
    $this->SetSimpleTypeRules();
    $this->simple_types[] = luminous_generic_constant();
    
      
  }
}